package com.ditest;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestED {
    public static void main(String[] args) {
//        ApplicationContext context = new ClassPathXmlApplicationContext("bean-di2-xml.xml");
//        Emp emp = (Emp) context.getBean("emp3");
//        emp.work();
        ApplicationContext context = new ClassPathXmlApplicationContext("di-list.xml");
        Dept dept = context.getBean("dept", Dept.class);
        dept.info();
    }
}
